package uk.ac.shef.ecomm;

/**
 * @author Saeed H. Al-Zahrani
 *
 */
public class ProjReq 
{
	protected String FreeTextReq;
	protected String language;
	protected int MinAge;
	protected int MaxAge;
	protected boolean Smoker;
	protected String Gender;
	protected int NumOfParticipants;
	
	public String getFreeTextReq() {
		return FreeTextReq;
	}
	public void setFreeTextReq(String freeTextReq) {
		FreeTextReq = freeTextReq;
	}
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
	public int getMaxAge() {
		return MaxAge;
	}
	public void setMaxAge(int maxAge) {
		MaxAge = maxAge;
	}
	public int getMinAge() {
		return MinAge;
	}
	public void setMinAge(int minAge) {
		MinAge = minAge;
	}
	public int getNumOfParticipants() {
		return NumOfParticipants;
	}
	public void setNumOfParticipants(int numOfParticipants) {
		NumOfParticipants = numOfParticipants;
	}
	public boolean isSmoker() {
		return Smoker;
	}
	public void setSmoker(boolean smoker) {
		Smoker = smoker;
	}
	public String getGender() {
		return Gender;
	}
	public void setGender(String gender) {
		Gender = gender;
	}
	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((FreeTextReq == null) ? 0 : FreeTextReq.hashCode());
		result = PRIME * result + ((Gender == null) ? 0 : Gender.hashCode());
		result = PRIME * result + MaxAge;
		result = PRIME * result + MinAge;
		result = PRIME * result + NumOfParticipants;
		result = PRIME * result + (Smoker ? 1231 : 1237);
		result = PRIME * result + ((language == null) ? 0 : language.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ProjReq other = (ProjReq) obj;
		if (FreeTextReq == null) {
			if (other.FreeTextReq != null)
				return false;
		} else if (!FreeTextReq.equals(other.FreeTextReq))
			return false;
		if (Gender == null) {
			if (other.Gender != null)
				return false;
		} else if (!Gender.equals(other.Gender))
			return false;
		if (MaxAge != other.MaxAge)
			return false;
		if (MinAge != other.MinAge)
			return false;
		if (NumOfParticipants != other.NumOfParticipants)
			return false;
		if (Smoker != other.Smoker)
			return false;
		if (language == null) {
			if (other.language != null)
				return false;
		} else if (!language.equals(other.language))
			return false;
		return true;
	}
	
}